﻿using System;
using System.Collections.Generic;

namespace Battle.Engine.InputData
{
    public class InPlayerData
    {
        public long pid;
        public int sid;
        public string nickName;
        public int level;
        public bool isPlayer = true;

        public bool isAuto;
        public double angerNum;
        public double damageFactor = 1;

        public List<InActorData> actors = new List<InActorData>();

        public InPlayerData() { }
        public InPlayerData(BattleFighterData data) {
            pid = data.role.playerUID;
            sid = data.role.serverId;
            nickName = data.role.nickName;
            level = data.role.playerLevel;
            isPlayer = data.isPlayer;
            isAuto = data.isAuto;
            angerNum = data.angerNum;
            damageFactor = data.damageFactor;

            actors = new List<InActorData>();
            foreach (var actor in data.actors) {
                actors.Add(new InActorData(actor));
            }
        }
    }
}
